<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="IE=edge" >
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"/>
  <title>Aliplayer Functions</title>
  <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.9.19/skins/default/aliplayer-min.css" />
  <script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.9.19/aliplayer-min.js"></script>
  <script src="./CommentCoreLibrary.js"></script>
  <!-- 请下载之后使用 -->
  <script type="text/javascript" charset="utf-8" src="./aliplayercomponents-1.0.8.min.js"></script>
</head>
<body>
<div id="player-con"></div>
<script>
  /* The bullet screen component is integrated with CommentCoreLibrary. For more information, see https://github.com/jabbany/CommentCoreLibrary/ */
  var danmukuList = [{
    "mode": 1,
    "text": "test",
    "stime": 1000,
    "size": 25,
    "color": 0xffffff
  }, {
    "mode": 1,
    "text": "test",
    "stime": 2000,
    "size": 25,
    "color": 0xff0000
  }, {
    "mode": 1,
    "text": "test",
    "stime": 30000,
    "size": 25,
    "color": 0xff0000
  }, {
    "mode": 1,
    "text": "test",
    "stime": 4000,
    "size": 25,
    "color": 0x00c1de
  }, {
    "mode": 1,
    "text": "test",
    "stime": 5000,
    "size": 25,
    "color": 0x00c1de
  }, {
    "mode": 1,
    "text": "test",
    "stime": 10000,
    "size": 25,
    "color": 0x00c1de
  }, {
    "mode": 1,
    "text": "test",
    "stime": 1000,
    "size": 25,
    "color": 0xffffff
  }, {
    "mode": 1,
    "text": "test",
    "stime": 1000,
    "size": 25,
    "color": 0xffffff
  }, {
    "mode": 1,
    "text": "test",
    "stime": 1000,
    "size": 25,
    "color": 0xffffff
  }, {
    "mode": 1,
    "text": "test",
    "stime": 1000,
    "size": 25,
    "color": 0xffffff
  }, {
    "mode": 1,
    "text": "test",
    "stime": 1000,
    "size": 25,
    "color": 0xffffff
  }, {
    "mode": 1,
    "text": "test",
    "stime": 1000,
    "size": 25,
    "color": 0xffffff
  }, {
    "mode": 1,
    "text": "test",
    "stime": 1000,
    "size": 25,
    "color": 0xffffff
  }, {
    "mode": 1,
    "text": "test",
    "stime": 1000,
    "size": 25,
    "color": 0xffffff
  }, {
    "mode": 1,
    "text": "test",
    "stime": 1000,
    "size": 25,
    "color": 0xffffff
  }, {
    "mode": 1,
    "text": "test",
    "stime": 1000,
    "size": 25,
    "color": 0xffffff
  }, {
    "mode": 1,
    "text": "test",
    "stime": 1000,
    "size": 25,
    "color": 0xffffff
  }, {
    "mode": 1,
    "text": "test",
    "stime": 1000,
    "size": 25,
    "color": 0xffffff
  }, {
    "mode": 1,
    "text": "test",
    "stime": 1000,
    "size": 25,
    "color": 0xffffff
  }]
  var player = new Aliplayer({
    id: "player-con",
    source: "//player.alicdn.com/video/editor.mp4",
    width: "100%",
    height: "500px",
    autoplay: true,
    isLive: false,
    controlBarVisibility: 'click',    /* The mode of the status bar, which is set to Click. */
    showBarTime: '10000',             /* The time period that you must wait before the status bar is hidden, which is set to 10,000 milliseconds. */
    components: [{
      name: 'AliplayerDanmuComponent',
      type: AliPlayerComponent.AliplayerDanmuComponent,
      args: [danmukuList]
    },
    {
      name: 'BulletScreenComponent',
      type: AliPlayerComponent.BulletScreenComponent,
      /** Descriptions of the scrolling text component parameters: text, style, bulletPosition 
       * text: The scrolling text
       * style: The style of the scrolling text
       * bulletPosition: The position of the scrolling text. Valid values: 'top', 'bottom', and 'random'. The default is 'random'.
       */
      args: ['欢迎使用阿里播放器', {fontSize: '16px', color: '#00c1de'}, 'random']
    }]
  }, function (player) {
    console.log("The player is created");
  });
</script>
</body>
</html>
